<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style type="text/css">
        #tip{
            margin:auto;
            width: 500px;
            height: 200px;
            border: 1px solid black;
            border-spacing: 0px;
        }
        #tip td{
            text-align: center;
            border: 1px solid black;
        }
        #bu{
            margin: 35px;
            margin-left: 655px;
        }
    </style>

    <script>
        function fn() {
            var num=parseInt(Math.random()*41+1)
            var num1=document.getElementById('t'+num);
            num1.style.backgroundColor='red';
            document.getElementById('yy').innerText='幸运儿是'+num1.innerText
        }

        function start() {
            for (let i = 1; i <=42; i++) {
                var num1=document.getElementById('t'+i);
                num1.style.backgroundColor='white';            
            }
            document.getElementById('yy').innerText='正在选一个幸运儿.....不急哦'
            setTimeout(fn,100)
        }

    </script>

</head>
<body>
   <table id="tip">
        <tr>
            <td id="t1">郑玮喆</td>
            <td id="t2">庄云</td>
            <td id="t3">廖治先</td>
            <td id="t4">郑文源</td>
            <td id="t5">戴俊锋</td>
            <td id="t6">陈昊童</td>
            <td id="t7">谢金金</td>
        </tr>

        <tr>           
            <td id="t8">占志新</td>
            <td id="t9">张淑芳</td>
            <td id="t10">刘永潘</td>  
            <td id="t11">廖柏成</td>
            <td id="t12">郑宗帅</td>
            <td id="t13">李韦峰</td>
            <td id="t14">吴欣燕</td>
        </tr>

        <tr>       
            <td id="t15">陈梅香</td> 
            <td id="t16">陈立智</td>
            <td id="t17">袁贵森</td>
            <td id="t18">赵浩敏</td>
            <td id="t19">林世涛</td>
            <td id="t20">罗启恒</td>
            <td id="t21">卢国建</td>
        </tr>
        <tr>     
            <td id="t22">黄柱菘</td>
            <td id="t23">陈鹏</td>
            <td id="t24">张耀仁</td>
            <td id="t25">陈华伟</td>
            <td id="t26">张正豪</td>
            <td id="t27">韦仲晓</td>
            <td id="t28">黄富贵</td>
        </tr>
        
        <tr>
            <td id="t29">陆建锋</td>
            <td id="t30">曾德森</td>
            <td id="t31">吴文龙</td>
            <td id="t32">陆利群</td>
            <td id="t33">黄雄</td>
            <td id="t34">王世财</td>
            <td id="t35">张先杰</td>
        </tr>

        <tr>
            <td id="t36">胡基耀</td>
            <td id="t37">马鑫涛</td>
            <td id="t38">李涛</td>
            <td id="t39">杨凌翔</td>
            <td id="t40">罗此东</td>
            <td id="t41">唐皓颖</td>
            <td id="t42">白婉婷</td>          
        </tr>   
    </table>  

    <div id="bu">
        <button onclick="start()">点名--Go</button>
        <span id="yy"></span>
    </div>
    

</body>
</html>